import 'package:flutter/material.dart';
import 'package:flutter_eve_plugin/constants/font_family.dart';
import 'package:flutter_eve_plugin/constants/font_weight.dart';
import 'package:flutter_eve_plugin/model/ye_xiu/achieves/archieves_add_attr_entity.dart';
import 'package:flutter_eve_plugin/utils/image_util.dart';
import 'package:flutter_eve_plugin/utils/screen_util.dart';

class ArchivesUpgradeAttrWidget extends StatelessWidget {

  final ArchievesAddAttrEntity info;

  const ArchivesUpgradeAttrWidget({
    Key key,this.info
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(top: setRatio(30)),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Container(
            color: Color(0x2F000000),
            height: setRatio(21),
            margin: EdgeInsets.only(left: setRatio(8), right: setRatio(8)),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                Expanded(
                  flex: 1,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      SizedBox(
                        width: setRatio(16),
                      ),
                      Image.asset(
                        imageUtilYeXiu('archives/icon_archivers_attr_life@3x'),
                        width: setRatio(19),
                        height: setRatio(19),
                      ),
                      Text.rich(TextSpan(
                          style: TextStyle(
                              decoration: TextDecoration.none,
                              fontFamily: FontFamily.PINGFANG,
                              fontWeight: FontWeightCustom.PF_Medium,
                              fontSize: setTextSp(11),
                              color: Color(0xFFFFFFFF)),
                          children: [
                            TextSpan(text: ' 生命  '),
                            TextSpan(
                                text: '+${info.hp ?? 0}',
                                style: TextStyle(
                                  color: Color(0xFF62F488),
                                )),
                          ]))
                    ],
                  ),
                ),
                Expanded(
                  flex: 1,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      SizedBox(
                        width: setRatio(16),
                      ),
                      Image.asset(
                        imageUtilYeXiu(
                            'archives/icon_archivers_attr_physical_defen@3x'),
                        width: setRatio(19),
                        height: setRatio(19),
                      ),
                      Text.rich(TextSpan(
                          style: TextStyle(
                              decoration: TextDecoration.none,
                              fontFamily: FontFamily.PINGFANG,
                              fontWeight: FontWeightCustom.PF_Medium,
                              fontSize: setTextSp(11),
                              color: Color(0xFFFFFFFF)),
                          children: [
                            TextSpan(text: ' 物防  '),
                            TextSpan(
                                text: '+${info?.def ?? 0}',
                                style: TextStyle(
                                  color: Color(0xFF62F488),
                                )),
                          ]))
                    ],
                  ),
                )
              ],
            ),
          ),
          Container(
            color: Color(0x26000000),
            height: setRatio(21),
            margin: EdgeInsets.only(left: setRatio(8), right: setRatio(8)),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                Expanded(
                  flex: 1,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      SizedBox(
                        width: setRatio(16),
                      ),
                      Image.asset(
                        imageUtilYeXiu(
                            'archives/icon_archivers_attr_attack@3x'),
                        width: setRatio(19),
                        height: setRatio(19),
                      ),
                      Text.rich(TextSpan(
                          style: TextStyle(
                              decoration: TextDecoration.none,
                              fontFamily: FontFamily.PINGFANG,
                              fontWeight: FontWeightCustom.PF_Medium,
                              fontSize: setTextSp(11),
                              color: Color(0xFFFFFFFF)),
                          children: [
                            TextSpan(text: ' 攻击  '),
                            TextSpan(
                                text: '+${info?.atk ?? 0}',
                                style: TextStyle(
                                  color: Color(0xFF62F488),
                                )),
                          ]))
                    ],
                  ),
                ),
                Expanded(
                  flex: 1,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      SizedBox(
                        width: setRatio(16),
                      ),
                      Image.asset(
                        imageUtilYeXiu(
                            'archives/icon_archivers_attr_mana_defen@3x'),
                        width: setRatio(19),
                        height: setRatio(19),
                      ),
                      Text.rich(TextSpan(
                          style: TextStyle(
                              decoration: TextDecoration.none,
                              fontFamily: FontFamily.PINGFANG,
                              fontWeight: FontWeightCustom.PF_Medium,
                              fontSize: setTextSp(11),
                              color: Color(0xFFFFFFFF)),
                          children: [
                            TextSpan(text: ' 法防  '),
                            TextSpan(
                                text: '+${info?.res ?? 0}',
                                style: TextStyle(
                                  color: Color(0xFF62F488),
                                )),
                          ]))
                    ],
                  ),
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
